﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using GameEngine;

namespace GameBoardViewer.Animation
{
    internal class SlideMoveAnimation: MoveAnimation
    {
        public SlideMoveAnimation(Position figurePos, Vector3 startPos, Vector3 finishPos, TimeSpan animationLength)
            : base(figurePos, startPos, finishPos, animationLength)
        {
        }

        protected override Vector3 CalculatePosition(float elapsedTime)
        {
            Vector3 ray = _finishPos - _startPos;
            return _startPos + ray * elapsedTime;
        }
    }
}
